import 'package:get/get.dart';
import 'package:signage/app/utils/sp_util.dart';

class TransferController extends GetxController {
  //TODO: Implement TransferController

  final maxConnections = 1.obs;
  static const String maxConnectionsKey = 'max_connections';
  
  @override
  void onInit() {
    super.onInit();
    _loadMaxConnections();
  }

  Future<void> _loadMaxConnections() async {
    maxConnections.value = SpUtil.getInt(maxConnectionsKey) ?? 1;
  }

  Future<void> updateMaxConnections(int value) async {
    maxConnections.value = value;
    SpUtil.setInt(maxConnectionsKey, value);
  }

  @override
  void onReady() {
    super.onReady();
  }

  @override
  void onClose() {
    super.onClose();
  }


}
